

:root {
  --primary-color: #191919;
  --white: #FFFFFF;
  --sidebar-primary: #353E47;
  --sidebar-primary-hover: #353E47;
  --sidebar-background: #070E13;
  --background: #F1F3FF;
  --text-link: #FFFFFF;
  --headline: #CBD1D8;
  --expand-button: #353E47;
  --logout: #FA7575;
}

body {
  font-family: 'Work Sans', 
  sans-serif;
  font-size: 16px;
  padding: 16px;
  height: 100%;
}

html {
  height: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.sidebar {
  position: sticky;
  top: 0;
  left: 0;
  min-height: 53.75rem;
  height: 100%;
  padding: 1rem 0px;
  border-radius: 1rem;
  max-width: 18rem;
  display: flex;
  color: var(--white);
  flex-direction: column;
  background: var(--sidebar-background);
  transition: max-width 0.1s ease-in-out;
}

body.collapsed .sidebar {
  max-width: 5rem;
  display: flex;
  align-items: center;
}

body.collapsed .hide {
  position: absolute;
  display: none;
}

/*? search wrapper */
.search__wrapper {
  padding: 0 1rem;
  position: relative;
}

.search__wrapper input {
  background: var(--background);
  height: 2.5rem;
  width: 100%;
  border-radius: 0.5rem;
  padding: 0 0.5rem;
  padding-left: 2rem;
  flex-grow: 1;
  outline: none;
  border: none;
}

.search__wrapper svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1.625rem;
  transform: translateY(-50%);
  pointer-events: none;
  right: 1.5rem;
}

body.collapsed .search__wrapper svg {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  stroke: var(--sidebar-primary-hover);
}

.search__wrapper 
input::-webkit-input-placeholder {
  color: var(--sidebar-primary-hover);
  white-space: nowrap;
}

body.collapsed .search__wrapper input {
  max-width: 2.5rem;
}

body.collapsed .search__wrapper 
input::-webkit-input-placeholder {
  color: transparent;
}

/*? sidebar top */

.sidebar-top-wrapper {
  display: flex;
}

.sidebar-top {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  height: 4rem;
  padding-bottom: 1rem;
}

body.collapsed .sidebar-top {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo__wrapper {
  margin-top: -0.25rem;
  display: flex;
  align-items: center;
  color: var(--text-link);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.35rem;
  gap: 0.5rem;
  padding: 0 1rem;
}

.logo-small {
  height: 48px;
  width: 48px;
  overflow: hidden;
  object-fit: cover;
}

/*? menu links */
.sidebar-links {
  margin-top: 1rem;
  width: 100%;
}

.sidebar-links h2 {
  margin-left: 1rem;
  color: var(--headline);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.125rem;
  margin-bottom: 0.5rem;
  animation: fadeIn 0.2s 
  ease-in-out;
}

body.collapsed h2 {
  display: none;
}

.sidebar-links ul {
  list-style-type: none;
  position: relative;
  display: flex;
  column-gap: 0.5rem;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.sidebar-links li {
  color: var(--text-link);
}

body.collapsed 
.sidebar-links li {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-links li svg {
  stroke: var(--text-link);
  width: 1.;
  height: 1.75rem;
  min-width: 1.75rem;
}

.sidebar-links li a:hover {
  background: var(
    --sidebar-primary-hover);
}

.sidebar-links li a {
  color: var(--text-link);
  flex-grow: 1;
  padding: 0 1rem;
  font-size: 1.25rem;
  display: flex;
  gap: 1.75rem;
  justify-content: center;
  align-items: center;
  height: 3.5rem;
  text-decoration: none;
  transition: background 0.2s
   ease-in-out;
}

.sidebar-links li a .link {
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
  animation: fadeIn 0.2s
   ease-in-out;
}

.sidebar-links li a img {
  height: 2.125rem;
  width: 2.125rem;
}

.sidebar-links .active:hover {
  background: var(
    --sidebar-primary-hover);
}

.sidebar-links .active {
  text-decoration: none;
  background: var(
    --sidebar-primary-hover);
  color: var(--text-link);
}

.sidebar-links .active svg {
  stroke: var(--text-link);
}

/* ?tooltip */
.tooltip {
  position: relative;
}

.tooltip .tooltip__content {
  visibility: hidden;
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  position: absolute;
  z-index: 1;
  left: 5.625rem;
}

.collapsed .tooltip:hover 
.tooltip__content {
  visibility: visible;
}

/*? profile part */
.sidebar__profile {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-direction: row;
  padding: 0 1rem;
  color: var(--text-link);
  overflow-x: hidden;
  min-height: 2.6125rem;
}

.avatar__wrapper {
  position: relative;
  display: flex;
}

.avatar {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  cursor: pointer;
  border-radius: 50%;
}

.avatar__name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  white-space: nowrap;
  animation: fadeIn 
  0.2s ease-in-out;
}

.user-name {
  font-weight: 600;
  text-align: left;
  color: var(--text-link);
  animation: fadeIn 
  0.2s ease-in-out;
}

.email {
  color: var(--text-link);
  font-size: 0.8125rem;
  animation: fadeIn 
  0.2s ease-in-out;
}

.logout {
  animation: fadeIn 
  0.2s ease-in-out;
  margin-left: auto;
}

.logout svg {
  color: var(--logout);
}

body.collapsed .logout {
  display: none;
}

/*? Expand button */

.expand-btn {
  position: absolute;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(
    --expand-button);
  z-index: 2;
  right: -1.125rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}

.expand-btn svg {
  transform: rotate(-180deg);
  stroke: var(--white);
  width: 1.25rem;
  height: 1.25rem;
}

body.collapsed .expand-btn svg {
  transform: rotate(-360deg);
}

.bottom-links {
  margin-top: auto;
}

@keyframes fadeIn {
  from {
    width: 0;
    opacity: 0;
  }

  to {
    opacity: 1;
    width: 100%;
  }
}